package com.hbnu.innerclass;

/**
 * @author kittychen
 * @date 2025-09-16 16:58
 */
public class InnerDemo04 {

    public static void main(String[] args) {
        // 正常的方式创建抽象类的子类对象
        AbstractDemo01 demo01 = new Demo01();

        // 通过匿名内部类的方式创建抽象类的子类对象
        AbstractDemo01 abstractDemo01 = new AbstractDemo01() {
            @Override
            public void method01() {

            }

            @Override
            public void method02() {

            }
        };

        InterfaceDemo01 interfaceDemo01 = new InterfaceDemo01() {
            @Override
            public void method() {

            }
        };
    }
}
